Map
Map Style
Q: | Which data types are supported by SuperMap iMobile for Android? |
---|---|
A: |
|
Q: | How to use SuperMap iServer, SuperMap Cloud and other network map services? |
A: |
The network map service is an independent data source type, which can be opened in the workspace, obtain the corresponding network map service data set, and add the data set to the map as a layer to display. |
Q: | How to open multiple online map services? |
A: |
To open multiple online map services, you need to instantiate the connection parameters of multiple data sources, DatasourceConnectionInfo, and set the parameters of each online map service separately. A data source connection corresponds to an alias, and the alias in the data source connection parameters need to be inconsistent. |
Q: | Does it support chart data? How to open chart data? |
A: |
The mobile terminal cannot open the chart data directly, but you can first open the chart data in iDesktop, make a cache, and then publish it as a rest map service in iServer, open the rest map service on the mobile terminal, and load the map. |
Map display
Q: | When using the publicly released network map service as the base map, why do other superimposed data and GPS data offset? |
---|---|
A: |
Publicly released network map services are usually encrypted and offset by data, such as Baidu map service; or use a specific projection coordinate system, such as Google map service; when such network map service is used as map superposition data, it is necessary to offset the superimposed data accordingly and convert it to the same projection coordinate system before it can be correctly superimposed. |
Q: | SuperMap iMobile loading day map and local sci layers are not superimposed? |
A: |
The result is incorrect because the coordinate system is inconsistent. Use map.setdynamicprojection (true) to turn on the dynamic projection and then view it. |
Q: | If you can't call the online sky map service, can other online map services be opened? |
A: |
|
Q: | The two-dimensional map scaling and center point setting of the sky map and local data are not effective? |
A: |
The map range after dynamic projection is no longer the original range of the sky map. You should get the data set of the sky map, then get the bounds of the sky map data set, and then use map.setviewbounds to set the corresponding display range. |
Q: | How to achieve high-definition display of loading online maps? |
A: |
Set the map HD display before adding or opening the map: map.setHighDefinitionMode(true). |
Q: | Why is the fill symbol set for the map in the desktop software (SuperMap iDesktop/iDesktopX), but the symbol is not displayed when opening the map in iMobile? |
A: |
The reason is that the symbol is a built-in symbol in the desktop software symbol library. If you want to display it on the mobile terminal, you need to import this built-in symbol in the format of picture symbols on iDesktop before you can open the display directly on the mobile terminal. |
Other
Q: | What is the reason for the slow display of line and surface data on the mobile terminal? |
---|---|
A: |
The common reason is that the displayed data set does not establish a spatial index. It is recommended to use SuperMap iDesktop to establish a spatial index for relevant data sets, which will greatly improve the display speed of lines and surfaces on mobile terminals. |
Q: | How to monitor the changes in the center point and scale of the map? |
A: |
Use mapControl.setMapParamChangedListener (MapParameterChangedListener listener) to set the map parameter change listener and listen in the callback event. Change of graph parameters. |
Q: | How to monitor the changes in map parameters? |
A: |
Use the map parameter change monitoring method of the MapControl class setMapParamChangedListener (MapParameterChangedListener) to listen to the map scale and corner. Degree, range and size changes. |
Q: | How to close maps, map controls and workspaces? What is the order of closing? |
A: |
|
Q: | There is a white background on the periphery of the loading and deleting the map. How to cancel it? |
A: |
You can use LayerSettingImage.setTransparent(true) to set the transparent display of the background color of the image layer. |
Q: | How to get the map coordinates corresponding to the finger click on the screen? |
A: |
First, set the short-press or long-press method in the user's gesture recognizer to obtain the screen coordinate Point of the touch screen position through the setGestureDetector() under the MapControl class, and then use the map.pixelToMap() method to turn the screen point to the map. Point coordinates Point2D. |
Q: | Calculation drawing, how to move the map? |
A: |
When Action does not roam for PAN, if you want to move the map, you need to press and hold the screen with two fingers and drag to move the map. |
Q: | The data set is the attribute table data. How to add a record to the attribute table? |
A: |
In the addNew(Geometry geometry, java.util.Map values) method, the Geometry parameter is empty, and the fields and field values that need to be passed in are stored in the Map object. |
Service
Q: | Access the rest map service released by SuperMap iServer. After SuperMap iServer is updated, can it be updated in real time on the Android side and dynamically produce pictures? |
---|---|
A: |
It can be updated in real time on Android and dynamically. Just clear the data set and the cache of the layer. The code is as follows: Layer imageLayer=mapControl.getMap().getLayers().get("rest"); DatasetImage image=(DatasetImage) imageLayer.getDataset(); imageLayer.removeCache(); image.getMapCacheService().removeCache(); |
Theme
Q: | Are the thematic labels of the line and surface layers not displayed in a small scale? |
---|---|
A: |
Mainly because at a small scale, the thematic label is larger than the size of the line and surface object, which is not displayed by default. ThemeLabel.setSmallGeometryLabeled(true) can also be displayed on a small scale. |
Q: | Create a label theme map, how can some labels not be displayed? |
A: |
There are two situations: 1. If you just don't show the tags of some small objects, you can set the themeLabel.setSmallGeometryLabeled(false) property. 2. If some specific label objects are not displayed, the following settings can be made: QueryParameter parameter=new QueryParameter(); parameter.setAttributeFilter("SMID=5"); themeLabelLayer.setDisplayFilter(parameter); mapcontrol.getMap().refresh(); |
Navigation
Q: | What is the reason for the failure when running the navigation function? |
---|---|
A: |
The common reason is the lack of voice resources. Please copy the voice folder under the Resource folder in the product package to the assets folder in the project directory. |
3D
Q: | Loading three-dimensional scenes, can some architectural models be set to be invisible? |
---|---|
A: |
1. Models of which ids need to be checked are invisible; 2. Set whether the model queue of the specified id is visible through Layer3DOSGBFile.setObjectsVisible(int[] ids, boolean value). |
Q: | When loading 3D scenes, can some architectural models be highlighted? |
A: |
1. You need to find out which ids are highlighted; 2. Set the display color of the model queue of the specified id through Layer3DOSGBFile.setObjectsColor(int[] ids, Color value). |
Q: | After opening the 3D scene and selecting a model, how to get the property information of the model? |
A: |
Get all the property information of the last selected model through the Layer3DOSGBFile.getAllFieldValueOfLastSelectedObject() method. |
Q: | How to convert screen coordinates to three-dimensional coordinates? |
A: |
Use the scene.pixelToGlobe (Point point, PixelToGlobeMode mode) method to convert the pixel coordinates of the screen into three-dimensional coordinates. |
License
Q: | How to obtain the device ID to apply for permission? |
---|---|
A: |
Get the device ID through environment.getDeviceID(). When obtaining it, you need to pay attention to: 1. The wifi permission of the device must be turned on; 2. TargetSDKVersion version is not more than 28. |
Q: | How to check the number of licenses and remaining usages using the serial number activation method? |
A: |
Use RecycleLicenseManager.queryLicenseCount(String), and then get the quantity through the callback function. |
Sample code
Q: | When running the project, the ".so file and jar package" do not match? |
---|---|
A: |
This error can be checked from the following points: 1. Whether the .so file and jar package version of iMobile for Android referenced in the project are consistent; 2. In addition to referring to the .so file in iMobile for Android, the project also refers to the .so file of a third party, resulting in conflicts; 3. Engineering. |
Q: | Common reasons why SampleCode does not run successfully? |
A: |
1. First, check whether the data and permissions used by the example program are placed in the location specified by the code. 2. Check whether the minimum permissions of the project are fully configured, click the permissions page in the AndroidManifest.xml node of the project, and add the following "Uses Permission": 1)<uses-permission android:name="android.permission.INTERNET"/> 2)<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION&quo T;/> 3)<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/ ≫ 4)<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE&q Uot;/> 5)<uses-permissionandroid:name="android.permission.CHANGE_WIFI_STATE"> ; 3. Whether to add the tools and platform-tools folder paths in android-sdk-windows to the environment variable. 4. When the amount of data used by SampleCode is large, it is necessary to check whether the capacity of SdCard is satisfied. If not, the capacity of SdCard should be expanded first. 5. Sometimes SampleCode does not run, you can try to uninstall the sample program first and run it again to prevent conflicts caused by incomplete uninstallation of SampleCode before. |